<html>
<head><meta charset="utf-8"><title>running rustc-perf locally · t-compiler/help · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/index.html">t-compiler/help</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/running.20rustc-perf.20locally.html">running rustc-perf locally</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="164036165"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/running%20rustc-perf%20locally/near/164036165" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/running.20rustc-perf.20locally.html#164036165">(Apr 23 2019 at 22:40)</a>:</h4>
<p>I followed the instructions in the rustc-perf/collector readme and am getting these errors when it invokes rustc:</p>
<div class="codehilite"><pre><span></span>error: couldn&#39;t load codegen backend &quot;.../rust-bench1/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/codegen-backends/librustc_codegen_llvm-llvm.so&quot;: &quot;librustc_codegen_ssa-0282cbda462baeb6.so: cannot open shared object file: No such file or directory&quot;
</pre></div>



<a name="164036181"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/running%20rustc-perf%20locally/near/164036181" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/running.20rustc-perf.20locally.html#164036181">(Apr 23 2019 at 22:40)</a>:</h4>
<p>(I also get errors like this when trying to invoke the <code>rustc</code> binary directly)</p>



<a name="164036210"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/running%20rustc-perf%20locally/near/164036210" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/running.20rustc-perf.20locally.html#164036210">(Apr 23 2019 at 22:41)</a>:</h4>
<p>any advice for fixing this? I tried setting <code>LD_LIBRARY_PATH</code> to a dir that contains the librustc_codegen_ssa so file, but for some reason this doesn't seem to work with the perf collector</p>



<a name="164038670"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/running%20rustc-perf%20locally/near/164038670" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/running.20rustc-perf.20locally.html#164038670">(Apr 23 2019 at 23:23)</a>:</h4>
<p><span class="user-mention" data-user-id="116883">@tmandry</span> How did you build rustc? <code>x.py build src/librustc_codegen_llvm</code> should be enough to fix that, I think</p>



<a name="164038737"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/running%20rustc-perf%20locally/near/164038737" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/running.20rustc-perf.20locally.html#164038737">(Apr 23 2019 at 23:24)</a>:</h4>
<p><span class="user-mention" data-user-id="116122">@simulacrum</span> ah perfect, thanks</p>



<a name="164038742"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/running%20rustc-perf%20locally/near/164038742" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/running.20rustc-perf.20locally.html#164038742">(Apr 23 2019 at 23:24)</a>:</h4>
<p>I built it using <code>src/libstd</code> at first</p>



<a name="164038744"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/running%20rustc-perf%20locally/near/164038744" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/running.20rustc-perf.20locally.html#164038744">(Apr 23 2019 at 23:24)</a>:</h4>
<p>If not then ping me and I can try and help more</p>



<a name="164038753"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/running%20rustc-perf%20locally/near/164038753" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/running.20rustc-perf.20locally.html#164038753">(Apr 23 2019 at 23:24)</a>:</h4>
<p>then I did <code>dist</code> and found that that works, but seems a little unnecessary :)</p>



<a name="164038770"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/running%20rustc-perf%20locally/near/164038770" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/running.20rustc-perf.20locally.html#164038770">(Apr 23 2019 at 23:25)</a>:</h4>
<p><code>x.py build</code> without any stage arguments should always be with src/librustc_codegen_llvm (we copy stage 1 anyway, so you're not really saving time by doing <code>x.py build src/libstd</code> in stage 2</p>



<a name="164038778"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/running%20rustc-perf%20locally/near/164038778" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/running.20rustc-perf.20locally.html#164038778">(Apr 23 2019 at 23:25)</a>:</h4>
<p>oh, ok</p>



<a name="164038786"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/running%20rustc-perf%20locally/near/164038786" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/running.20rustc-perf.20locally.html#164038786">(Apr 23 2019 at 23:25)</a>:</h4>
<p>I was never sure what that did</p>



<a name="164038822"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/running%20rustc-perf%20locally/near/164038822" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/running.20rustc-perf.20locally.html#164038822">(Apr 23 2019 at 23:26)</a>:</h4>
<p>er, I was building with <code>--stage 2</code></p>



<a name="164038850"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/running%20rustc-perf%20locally/near/164038850" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/running.20rustc-perf.20locally.html#164038850">(Apr 23 2019 at 23:26)</a>:</h4>
<p>Yeah, that's equivalent to not saying anything</p>



<a name="164038860"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/running%20rustc-perf%20locally/near/164038860" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/running.20rustc-perf.20locally.html#164038860">(Apr 23 2019 at 23:26)</a>:</h4>
<p>rustlib is the directory that crates rustc builds link against (e.g. std, core, etc.) so you need it to be able to run things</p>



<a name="164038868"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/running%20rustc-perf%20locally/near/164038868" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/running.20rustc-perf.20locally.html#164038868">(Apr 23 2019 at 23:26)</a>:</h4>
<p>it also happens to -- somewhat confusingly -- include the codegen-backends dir which rustc links against</p>



<a name="164038872"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/running%20rustc-perf%20locally/near/164038872" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/running.20rustc-perf.20locally.html#164038872">(Apr 23 2019 at 23:27)</a>:</h4>
<p>this is mostly for distro reasons IIRC</p>



<a name="164039056"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/running%20rustc-perf%20locally/near/164039056" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/running.20rustc-perf.20locally.html#164039056">(Apr 23 2019 at 23:30)</a>:</h4>
<p>okay, makes sense, sort of :) I'll use that from now on, thanks!</p>



<a name="164039323"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/running%20rustc-perf%20locally/near/164039323" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/running.20rustc-perf.20locally.html#164039323">(Apr 23 2019 at 23:35)</a>:</h4>
<p><span class="user-mention" data-user-id="116883">@tmandry</span> fwiw you probably want a --keep-stage 0 on that after you rebuild once post-rebase (or bootstrap compiler change, etc.)</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>